<extend name="Public/base" />
<block name="style">
    <style type="text/css">
        .form-item{border-bottom: 1px dashed #ccc;padding-top: 5px;padding-bottom: 5px;}
        .item-label{float: left;width: 130px;text-align: right;padding-right: 20px;color: #999;}
        .controls{float: left;}
    </style>
</block>
<block name="body">

    <div class="main-title cf">
        <h2 style="padding-left: 10px;">{$info.realname} 详细资料</h2>
    </div>
    <!-- 标签页导航 -->
    <div class="tab-wrap">
        <div class="tab-content">
            <ul class="tab-nav nav">
                <li data-tab="tab1" class="current"><a href="javascript:void(0);">基本信息 </a></li>
            </ul>
            <!-- 表单 -->
            <form id="form" method="post" class="form-horizontal doc-modal-form">
                       <!-- 学籍信息  -->
                <div id="tab1" class="tab-pane in tab1">

                    <div class="form-item cf">
                        <label class="item-label">真实姓名 ：</label>
                        <div class="controls">
                            <input type="text" name="realname" id="realnameUpdate" value="{$info.realname}" style="border:none;background:#F6F6F6">
                            <!-- <span>{$info.realname}</span> -->
                        </div>
                    </div>

                    <div class="form-item cf">
                        <label class="item-label">身份证号 ： </label>
                        <div class="controls">
                            <span id="identityNo">{$info.identityNo}</span>
                        </div>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label">有效时间 ： </label>
                        <div class="controls">
                            <span>{$info.validity_period}</span>
                        </div>
                    </div>

                    <div class="form-item cf">
                        <label class="item-label">居住地址 ： </label>
                        <div class="controls">
                            <span id="identityNo">{$info.address}</span>
                        </div>
                    </div>


                    <div class="form-item cf">
                        <label class="item-label">身份证正面 ： </label>
                        <div class="controls" style="height:100px;">
                            <empty name="info['front_pic']">
                                 <span>未上传</span>
                                <else/>
                                <php>
                                    $url_pic =  get_weixin_pic($info['front_pic'],'Realname',"uid=".$info['uid'],'front_pic');
                                </php>
                                <a href="{$url_pic}" target="_blank"><img src="{$url_pic}" style="width: 200px;height: 100px;"></a>
                            </empty>

                        </div>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label">身份证反面 ： </label>
                        <div class="controls" style="height:100px;">

                            <empty name="info['opposite_pic']">
                                <span>未上传</span>
                                <else/>
                                <php>
                                    $url_pic =  get_weixin_pic($info['opposite_pic'],'Realname',"uid=".$info['uid'],'opposite_pic');
                                </php>
                                <a href="{$url_pic}" target="_blank" ><img src="{$url_pic}" style="width: 200px;height: 100px;"></a>
                            </empty>
                        </div>
                    </div>
                    <div class="form-item cf" >
                        <label class="item-label">手持身份证 ： </label>
                        <div class="controls" style="height:100px;">
                            <empty name="info['hold_pic']">
                                <span>未上传</span>
                                <else/>

                                <php>
                                    $url_pic =  get_weixin_pic($info['hold_pic'],'Realname',"uid=".$info['uid'],'hold_pic');
                                </php>
                                <a href="{$url_pic}" target="_blank"><img src="{$url_pic}" style="width: 200px;height: 100px;"></a>
                            </empty>
                        </div>
                    </div>

                    
                    <div class="form-item cf">
                        <label class="item-label">认证状态 ： </label>
                        <div class="controls">
                            <span>{:C('QIANBAO_AUTH_STATUS.'.$info[status])}</span>
                        </div>
                    </div>


                </div>
                <div class="form-item">
                    <input name="id" value="11" type="hidden">
                    <a class="ajax-get submit-btn btn" href="{:U('change?type=realname&method=2&id='.$info['uid'])}">通过</a>
                    <a class="btn btn-return ajax-get" href="{:U('change?type=realname&method=3&id='.$info['uid'])}">不通过</a>
                </div>
            </form>
        </div>
    </div>
</block>
<block name="script">
    <script type="text/javascript" src="__STATIC__/jquery.dragsort-0.5.1.min.js"></script>
    <script type="text/javascript" charset="utf-8">
        Think.setValue("extend", {$info.extend|default=0});
        //导航高亮
        highlight_subnav('{:U('Authentication/realname')}');


        $(function(){
            showTab();

            $("#realnameUpdate").blur(function(){
                var identityNo=$('#identityNo').html();
                var realname=$(this).val();
                $.ajax({
                    type:'post',
                    data:{'identityNo':identityNo,'realname':realname},
                    url:"{:U('realnameUpdate')}",
                    success:function(m){
                        alert(m)
                        location.reload();
                    }
                })
            })
        })

    </script>
</block>

